<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt_rt"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Insert title here</title>
	<script type="text/javascript" src="../js/jquery.min.js"></script>	
<script type="text/javascript">
	function putOn(){
	//检查表单是否都通过验证
		var interviewer=$("#select").val();
		location.href="/kss/staff/findAllStaff.do?interviewer="+interviewer+"&staff_name=null";
}
function putOn1(){
	//检查表单是否都通过验证
		var name=$("#name").val();
		location.href="/kss/staff/findAllStaff.do?staff_name="+name+"&interviewer=ALL";
}
</script>

</head>
<body>
<label>面试官姓名：</label>
<select id="select" onchange="putOn()">
	<option value="ALL">全部</option>
	<c:forEach items="${interviewers}" var="interviewer">
		<c:if test="${interview==interviewer}">
				<option value="${interviewer}" selected="selected">${interviewer}</option>
		</c:if>
		<c:if test="${interview!=interviewer}">
				<option value="${interviewer}" >${interviewer}</option>
		</c:if>
			
           </c:forEach>
</select>

<label>实习生姓名：</label>
<c:if test="${staff_name!='null'}">
	<input id="name" type="text" value="${staff_name}">
</c:if>

<c:if test="${staff_name=='null'}">
	<input id="name" type="text"/>
</c:if>
<input id="button" type="button" value="查询" onclick="putOn1()">

<a href="/kss/staff/importStaff.do">导入</a>

	<table>
		<c:forEach items="${staffs}" var="staff">
                        	<tr>
                        	
                            <td>${staff.staffId}</td>
                            <td>${staff.staffName}</td>
                            <td>${staff.school}</td>
                            <td><fmt:formatDate value="${staff.graduate}"
														pattern="yyyy-MM-dd" /></td>
                            <td>${staff.tel}</td>
                            <td>
                             
                                <!--<input type="button" value="詳情" onclick="/kss/staff/findOneStaffById.do?staff_id="+${staff.staffId}/>
                                --><a href="/kss/staff/findOneStaffById.do?staff_id=${staff.staffId}">详情</a>
                            </td>
                        </tr>
                        </c:forEach>
	</table>
	<a href="/kss/staff/findAllSchool.do">查看学校分布</a>
	
</body>
</html>